import rxAjax from '@/assets/js/ajax.js';

//转换日志表 api接口
export const FormTransLogApi = {};

FormTransLogApi.baseUrl= '/api-form/form/core/formTransLog';
FormTransLogApi.exportUrl= FormTransLogApi.baseUrl + '/export';

//查询列表
FormTransLogApi.query=function (parameter) {
  var url= FormTransLogApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
FormTransLogApi.get =function(pkId) {
  var url= FormTransLogApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
FormTransLogApi.save =function(parameter) {
  var url= FormTransLogApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
FormTransLogApi.del =function(parameter) {
  var url= FormTransLogApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

//删除所有数据
FormTransLogApi.delAll =function(parameter) {
    var url= FormTransLogApi.baseUrl + '/deleteAll';
    return rxAjax.postUrl(url,parameter);
}

export  default FormTransLogApi;

